const defaults = {}

class Axios {
	constructor(instanceConfig) {
	}
	request(){
		console.log("request");
	}
}

function createInstance(defaultConfig) {
	// 创建一个Axios实例
	const context = new Axios(defaultConfig);
	// 调用axios的本质是调用instance,instance的本质是：Axios.prototype.request
	const instance = Axios.prototype.request.bind(context);
	return instance;
}

const axios = createInstance(defaults);
export default axios;